<template>
    <div class="no-wcomment">
        <span>
            <img class="no-comment disabled" v-if="!noData.imgUrl" :src="staticImageUrl('/images/look/no_comment_list.png')" alt="">
            <img class="no-comment disabled" v-else :src="noData.imgUrl" alt="">
            <p class="no-comment-text">{{noData.text}}</p>
        </span>
    </div>
</template>

<script>
    export default {
        name: "NoData",
        props:{
            noDataProps:{
                type:Object
            }
        },
        data(){
            return{
                noData:{
                    text:'暂时还没有内容哦',
                    imgUrl:'',
                }
            }
        },
        mounted(){
            this.noData = Object.assign({},this.noData,this.noDataProps);
        },
        watch:{
            noDataProps(val){
                this.noData = Object.assign({},this.noData,val);
            }
        }

    }
</script>

<style scoped lang="scss">
    .no-wcomment {
        position: relative;
        z-index: 1060;
        background-color: #fff;
        width: 100%;
        height: 100%;
        border-top-left-radius: 6px;
        border-top-right-radius: 6px;
        display: -webkit-flex;
        display: flex;
        -webkit-justify-content: center;
        justify-content: center;
        -webkit-align-items: center;
        align-items: center;

    .no-comment {
        width: 1.8rem;
        height: 1.8rem;
    }

    .no-comment-text {
        color: #525866;
        text-align: center;
        padding-top: .2rem;
    }
    }
</style>